require('../css/poster.css');
require('../css/animate.min.css')

window.addEventListener('load', function () {

    let time = document.querySelector(".time");
    let skip = document.querySelector(".skip");

    //进入页面开始5秒倒计时  结束跳转到注册页
    let num = 5;
    let timer = setInterval(function () {
        num--;
        time.innerText = num +'S';
        if (num == 0) {
            //到注册页
            location.href = './login.html';
            clearInterval(timer);
        }
    }, 1000)

    //点击跳过到注册页
    //移动端点击事件 touchstart  touchend
    //手机touch没有延迟   click事件有300ms延迟
    skip.addEventListener("touchstart", function () {
        location.href = './login.html';
    })

})
